package service

import (
	"gin/types"
	"github.com/gin-gonic/gin"
)

type TenantGroup struct {
}

// GetTenantGroupMemberByProject 查询项目成员信息
func (t *TenantGroup) GetTenantGroupMemberByProject(ctx *gin.Context, projectTenantId int64, allProjectTenantId []int64, selectTenantStepCategory string, selectTenantAddress string) (res types.GetTenantGroupMemberByProjectRes, err error) {
	var tr TeamonesRequest
	var req = types.GetTenantGroupMemberByProjectReq{}
	req.Param.Filter.ProjectTenantId = projectTenantId
	req.Param.Filter.AllProjectTenantId = allProjectTenantId
	req.Param.Filter.Options.SelectTenantAddress = selectTenantAddress
	req.Param.Filter.Options.SelectTenantStepCategory = selectTenantStepCategory
	var headers = map[string]string{"x-userinfo": GetStringFromContext(ctx, "x-userinfo")}

	err = tr.Do("teamones-im", "tenant_group_member/get_tenant_group_member_by_project", req, headers, &res)
	if err != nil {
		return
	}
	return
}
